<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<JS href="../Public/js/jquery.js" />
<script>
function del(id)
{
	if(confirm('确定删除这个栏目！请保证此栏目下没有任何数据，否则可能引起错误'))
		{
	$.post('{$delurl}',
			{'id':id},
			function(data){
				eval('data='+data);
				if(data.state == 1)
					{
						window.location.reload();
					}else
						{
						alert(data.msg);
						}
			})	
		}
}

function edit(id)
{
	window.location.href="{$editurl}/id/"+id;
	}
	function chk(){
		if($('#classname').val()=='')
			{
			alert('请输入栏目名称');
			$('#classname').focus();
			return false;
			}
		
		
		
	}
</script>
</head>
<body>
<div class="main">
<table cellspacing="0" border="1" width="80%">
<tr><td>标题</td><td width="100">操作</td></tr>
<volist name="list" id="vo">
<tr><td>{$vo.classname}</td><td><input type="button" onclick="del('{$vo.id}')" value="删" /><input type="button" onclick="edit('{$vo.id}')" value="改" /></td></tr>
</volist>

</table>
<fieldset>
<legend>添加新栏目</legend>
<form action="{$addurl}" method="post" onsubmit="return chk();">
栏目名称:<input type="text" name="classname" id="classname" /> 
URL:<input type="text" name="url" id="url"/> 
<input type="submit" value="提交 " />

</form>
</fieldset>
</div>

</body>
</html>
